package net.lovesrc.allin.biz.ocr;

import net.lovesrc.allin.jobs.IdCardOcrJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhouxiaolong
 * date 2021/5/19 17:54
 */
@RestController
@RequestMapping("/ocr")
public class OcrController {
    @Autowired
    private IdCardOcrJob idCardOcrJob;

    @RequestMapping("/start")
    public String start() {
        idCardOcrJob.flag.set(true);
        return "ok";
    }


    @RequestMapping("/stop")
    public String stop() {
        idCardOcrJob.flag.set(false);
        return "ok";
    }

}
